/*
 * ColorTheme.java
 *
 * Created on 22.05.2008, 22:39
 *
 * Copyright (c) 2006-2008, Daniel Apatin (ad), http://apatin.net.ru
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * You can also redistribute and/or modify this program under the
 * terms of the Psi License, specified in the accompanied COPYING
 * file, as published by the Psi Project; either dated January 1st,
 * 2005, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package Colors;

import java.util.Vector;
/**
 *
 * @author ad
 */
public class ColorTheme {
    private static ColorTheme instance;

    public static ColorTheme getInstance(){
	if (instance==null) {
	    instance=new ColorTheme();
            init();
	}
	return instance;
    }
    
    public static Vector colorsContainer;
    
    public static void init() {
        colorsContainer=new Vector();

        colorsContainer.addElement(new ColorItem("LIST_BGND", 0xffffff));
        colorsContainer.addElement(new ColorItem("LIST_INK", 0x000000));
        colorsContainer.addElement(new ColorItem("BAR_BGND", 0xad1010));
        colorsContainer.addElement(new ColorItem("BAR_INK", 0xffffff));
        colorsContainer.addElement(new ColorItem("MSG_HIGHLIGHT", 0x7540b0));
        colorsContainer.addElement(new ColorItem("CURSOR_BGND", 0xbbddee));
        colorsContainer.addElement(new ColorItem("CURSOR_OUTLINE", 0x1ea5c5));
        colorsContainer.addElement(new ColorItem("SCROLL_BRD", 0x565656));
        colorsContainer.addElement(new ColorItem("SCROLL_BAR", 0x929292));
        colorsContainer.addElement(new ColorItem("SCROLL_BGND", 0xffffff));
        colorsContainer.addElement(new ColorItem("CONTROL_ITEM", 0x1ea5c5));
    }

    public static int getColor(int id) {
	return ((ColorItem)colorsContainer.elementAt(id)).getValue();
    }
    
    public final static int LIST_BGND               =0;
    public final static int LIST_INK                =1;
    public final static int BAR_BGND                =2;
    public final static int BAR_INK                 =3;    
    public final static int MSG_HIGHLIGHT           =4;
    public final static int CURSOR_BGND             =5;
    public final static int CURSOR_OUTLINE          =6;
    public final static int SCROLL_BRD              =7;
    public final static int SCROLL_BAR              =8;
    public final static int SCROLL_BGND             =9;
    public final static int CONTROL_ITEM            =10;
}
